/** * Creates a {@link Claim}. It might be more convenient to use * {@link #makeStatement} directly if you want to build a statement. * * @param subject * the subject the Statement refers to * @param mainSnak * the main Snak of the Statement * @param qualifiers * the qualifiers of the Statement, grouped in SnakGroups * @return a {@link Claim} corresponding to the input */ public static Claim makeClaim(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers) { return factory.getClaim(subject, mainSnak, qualifiers); }
/** * Creates a {@link DatatypeIdValue}. The datatype IRI is usually one of the * constants defined in {@link DatatypeIdValue}, but this is not enforced, * since there might be extensions that provide additional types. * * @param id * the IRI string that identifies the datatype * @return a {@link DatatypeIdValue} corresponding to the input */ public static DatatypeIdValue makeDatatypeIdValue(String id) { return factory.getDatatypeIdValue(id); }
/** * Creates an {@link FormDocument}. * * @param formIdValue * the id of the form that data is about * @param representations * the list of representations of this lexeme, with at most one * lemma for each language code * @param grammaticalFeatures * the grammatical features of the lexeme * @param statementGroups * the list of statement groups of this lexeme; all of them must * have the given lexemeIdValue as their subject * @return a {@link LexemeDocument} corresponding to the input */ public static FormDocument makeFormDocument(FormIdValue formIdValue, List<MonolingualTextValue> representations, List<ItemIdValue> grammaticalFeatures, List<StatementGroup> statementGroups) { return factory.getFormDocument(formIdValue, representations, grammaticalFeatures, statementGroups, 0); }
/** * Creates a {@link MonolingualTextValue}. * * @param text * the text of the value * @param languageCode * the language code of the value * @return a {@link MonolingualTextValue} corresponding to the input */ public static MonolingualTextValue makeMonolingualTextValue(String text, String languageCode) { return factory.getMonolingualTextValue(text, languageCode); }
List<StatementGroup> statementGroups, Map<String, SiteLink> siteLinks, long revisionId) { return factory.getItemDocument(itemIdValue, labels, descriptions, aliases, statementGroups, siteLinks, revisionId);
/** * Creates an {@link LexemeIdValue} for Wikidata. * * @param id * a string of the form Ln... where n... is the string * representation of a positive integer number * @return an {@link LexemeIdValue} corresponding to the input */ public static LexemeIdValue makeWikidataLexemeIdValue(String id) { return factory.getLexemeIdValue(id, SITE_WIKIDATA); }
/** * Creates an {@link ItemIdValue} for Wikidata. * * @param id * a string of the form Qn... where n... is the string * representation of a positive integer number * @return an {@link ItemIdValue} corresponding to the input */ public static ItemIdValue makeWikidataItemIdValue(String id) { return factory.getItemIdValue(id, SITE_WIKIDATA); }
/** * Creates a {@link GlobeCoordinatesValue}. * * @param latitude * the latitude of the coordinates in degrees * @param longitude * the longitude of the coordinates in degrees * @param precision * the precision of the coordinates in degrees * @param globeIri * IRI specifying the celestial objects of the coordinates * @return a {@link GlobeCoordinatesValue} corresponding to the input */ public static GlobeCoordinatesValue makeGlobeCoordinatesValue( double latitude, double longitude, double precision, String globeIri) { return factory.getGlobeCoordinatesValue(latitude, longitude, precision, globeIri); }
List<FormDocument> forms, List<SenseDocument> senses) { return factory.getLexemeDocument(lexemeIdValue, lexicalCategory, language, lemmas, statementGroups, forms, senses, 0);
/** * Creates an {@link FormIdValue} for Wikidata. * * @param id * a string of the form Ln...-F... where n... and m... are the string * representation of a positive integer number * @return an {@link FormIdValue} corresponding to the input */ public static FormIdValue makeWikidataFormIdValue(String id) { return factory.getFormIdValue(id, SITE_WIKIDATA); }
/** * Creates a {@link MonolingualTextValue}. * * @param text * the text of the value * @param languageCode * the language code of the value * @return a {@link MonolingualTextValue} corresponding to the input */ public static MonolingualTextValue makeMonolingualTextValue(String text, String languageCode) { return factory.getMonolingualTextValue(text, languageCode); }
List<StatementGroup> statementGroups, Map<String, SiteLink> siteLinks, long revisionId) { return factory.getItemDocument(itemIdValue, labels, descriptions, aliases, statementGroups, siteLinks, revisionId);
/** * Creates an {@link LexemeIdValue} for Wikidata. * * @param id * a string of the form Ln... where n... is the string * representation of a positive integer number * @return an {@link LexemeIdValue} corresponding to the input */ public static LexemeIdValue makeWikidataLexemeIdValue(String id) { return factory.getLexemeIdValue(id, SITE_WIKIDATA); }
/** * Creates an {@link ItemIdValue} for Wikidata. * * @param id * a string of the form Qn... where n... is the string * representation of a positive integer number * @return an {@link ItemIdValue} corresponding to the input */ public static ItemIdValue makeWikidataItemIdValue(String id) { return factory.getItemIdValue(id, SITE_WIKIDATA); }
/** * Creates a {@link GlobeCoordinatesValue}. * * @param latitude * the latitude of the coordinates in degrees * @param longitude * the longitude of the coordinates in degrees * @param precision * the precision of the coordinates in degrees * @param globeIri * IRI specifying the celestial objects of the coordinates * @return a {@link GlobeCoordinatesValue} corresponding to the input */ public static GlobeCoordinatesValue makeGlobeCoordinatesValue( double latitude, double longitude, double precision, String globeIri) { return factory.getGlobeCoordinatesValue(latitude, longitude, precision, globeIri); }
List<FormDocument> forms, List<SenseDocument> senses) { return factory.getLexemeDocument(lexemeIdValue, lexicalCategory, language, lemmas, statementGroups, forms, senses, 0);
/** * Creates an {@link FormIdValue} for Wikidata. * * @param id * a string of the form Ln...-F... where n... and m... are the string * representation of a positive integer number * @return an {@link FormIdValue} corresponding to the input */ public static FormIdValue makeWikidataFormIdValue(String id) { return factory.getFormIdValue(id, SITE_WIKIDATA); }
/** * Copies a {@link MonolingualTextValue}. This method is not affected by the * language filter option (see * {@link DatamodelConverter#setOptionLanguageFilter(Set)}). * * @param object * object to copy * @return copied object */ public MonolingualTextValue copy(MonolingualTextValue object) { return dataObjectFactory.getMonolingualTextValue(object.getText(), object.getLanguageCode()); }
/** * Returns the {@link ItemDocument} that has been built. * * @return constructed item document * @throws IllegalStateException * if the object was built already */ @Override public ItemDocument build() { prepareBuild(); return factory.getItemDocument((ItemIdValue) this.entityIdValue, this.labels, this.descriptions, this.aliases, getStatementGroups(), this.siteLinks, this.revisionId); }
/** * Creates an {@link LexemeIdValue}. * * @param id * a string of the form Ln... where n... is the string * representation of a positive integer number * @param siteIri * IRI to identify the site, usually the first part of the entity * IRI of the site this belongs to, e.g., * "http://www.wikidata.org/entity/" * @return an {@link LexemeIdValue} corresponding to the input */ public static LexemeIdValue makeLexemeIdValue(String id, String siteIri) { return factory.getLexemeIdValue(id, siteIri); }