
com.mysema.rdfbean.annotations.Localized Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2010 Mysema Ltd.
* All rights reserved.
*
*/
package com.mysema.rdfbean.annotations;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @Localized String properties are directly bound to the best matching
* literal value using session locale preferences. When updating localized
* String properties, the primary language is expected.
*
*
* @Predicate(ns = RDFS.NS)
* @Localized
* private String label;
*
*
* Another alternative is to use Locale-to-String map:
*
*
* @Predicate(ns = RDFS.NS, ln = "label")
* @Localized
* private Map<Locale, String> labels;
*
*
* @author sasa
*/
@Documented
@Target({ METHOD, FIELD, PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
public @interface Localized {
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy