diff --git a/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFResource.java b/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFResource.java index b037e16..21270d0 100644 --- a/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFResource.java +++ b/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFResource.java @@ -36,9 +36,6 @@ public class RDFResource extends RDFModelElement { protected static final String LITERAL_SUFFIX = "_literal"; - - // TODO should be moved to the model, and parsed only once when the model loads - protected List preferredLanguageTagList; enum LiteralMode { RAW, VALUES_ONLY @@ -49,8 +46,6 @@ enum LiteralMode { public RDFResource(Resource resource, RDFModel rdfModel) { super(rdfModel); this.resource = resource; - preferredLanguageTagList = rdfModel.getLanguagePreference(); - preferredLanguageTagList.add(""); } public Resource getResource() { @@ -84,7 +79,7 @@ public Collection getProperty(String property, IEolContext context) { private Collection filterByPreferredLanguage(Collection value, LiteralMode literalMode) { // If no preferred languages are specified, don't do any filtering - if (preferredLanguageTagList.isEmpty()) { + if (super.getModel().getLanguagePreference().isEmpty()) { switch (literalMode) { case RAW: return value; @@ -108,7 +103,7 @@ private Collection filterByPreferredLanguage(Collection value, L } } - for (String tag : preferredLanguageTagList) { + for (String tag : super.getModel().getLanguagePreference()) { if (literalsByTag.containsKey(tag)) { switch (literalMode) { case RAW: