Literal implements Node { public String getLanguageTag() { int i = _data.lastIndexOf("\""); String str = _data.substring(i + 1); if (!str.startsWith("@")) { return null; } else { return str.substring(1); } } Literal(String data);  Literal(String data, boolean isNTriples);  Literal(String data, String lang);  Literal(String data, Resource dt);  Literal(String data, String lang, Resource dt); private  Literal(String data, String lang, Resource dt, boolean isNTriples); @Override String getLabel(); String getLanguageTag(); Resource getDatatype(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Node n);  }
@Test public void testLangTag() { String data = "\"Test{}…\"@en"; Literal l = new Literal(data, true); assertEquals("en", l.getLanguageTag()); }