@@ -73,6 +73,10 @@ export interface Literal {
7373     * @link  http://tools.ietf.org/html/bcp47 
7474     */ 
7575    language : string ; 
76+     /** 
77+      * the direction of the language-tagged string. 
78+      */ 
79+     direction ?: 'ltr'  |  'rtl'  |  ''  |  null ; 
7680    /** 
7781     * A NamedNode whose IRI represents the datatype of the literal. 
7882     */ 
@@ -81,7 +85,7 @@ export interface Literal {
8185    /** 
8286     * @param  other The term to compare with. 
8387     * @return  True if and only if other has termType "Literal" 
84-      *                   and the same `value`, `language`, and `datatype`. 
88+      *                   and the same `value`, `language`, `direction`,  and `datatype`. 
8589     */ 
8690    equals ( other : Term  |  null  |  undefined ) : boolean ; 
8791} 
@@ -254,16 +258,19 @@ export interface DataFactory<OutQuad extends BaseQuad = Quad, InQuad extends Bas
254258    blankNode ( value ?: string ) : BlankNode ; 
255259
256260    /** 
257-      * @param                  value              The literal value. 
258-      * @param  languageOrDatatype The optional language or datatype. 
259-      *                                                    If `languageOrDatatype` is a NamedNode, 
260-      *                                                    then it is used for the value of `NamedNode.datatype`. 
261-      *                                                    Otherwise `languageOrDatatype` is used for the value 
262-      *                                                    of `NamedNode.language`. 
261+      * @param  value              The literal value. 
262+      * @param  languageOrDatatype The optional language, datatype, or directional language. 
263+      *                           If `languageOrDatatype` is a NamedNode, 
264+      *                           then it is used for the value of `NamedNode.datatype`. 
265+      *                           If `languageOrDatatype` is a NamedNode, it is used for the value 
266+      *                           of `NamedNode.language`. 
267+      *                           Otherwise, it is used as a directional language, 
268+      *                           from which the language is set to `languageOrDatatype.language` 
269+      *                           and the direction to `languageOrDatatype.direction`. 
263270     * @return  A new instance of Literal. 
264271     * @see  Literal 
265272     */ 
266-     literal ( value : string ,  languageOrDatatype ?: string  |  NamedNode ) : Literal ; 
273+     literal ( value : string ,  languageOrDatatype ?: string  |  NamedNode   |   DirectionalLanguage ) : Literal ; 
267274
268275    /** 
269276     * This method is optional. 
@@ -308,3 +315,8 @@ export interface DataFactory<OutQuad extends BaseQuad = Quad, InQuad extends Bas
308315     */ 
309316    fromQuad ( original : InQuad ) : OutQuad ; 
310317} 
318+ 
319+ export  interface  DirectionalLanguage  { 
320+     language : string ; 
321+     direction ?: 'ltr'  |  'rtl'  |  ''  |  null ; 
322+ } 
0 commit comments