/** Create a selector. A model <b>may</b> restrict statements that are tested using * the <CODE>selects</CODE> method to those whose subject matches the * subject parameter, whose predicate matches the predicate parameter and whose * object matches the object paramater. Any null parameter is considered to * match anything. * @param subject if not null, the subject of selected statements * must equal this argument. * @param predicate if not null, the predicate of selected statements * must equal this argument. * @param object the object of selected statements * must equal this argument - the null string matches the empty string * @param language the language of the object constraint */ public SimpleSelector(Resource subject, Property predicate, String object, String language) { this.subject = subject; this.predicate = predicate; if (object != null) { this.object = literal( object, language ); } else { this.object = null; } }
/** Create a selector. A model <b>may</b> restrict statements that are tested using * the <CODE>selects</CODE> method to those whose subject matches the * subject parameter, whose predicate matches the predicate parameter and whose * object matches the object paramater. Any null parameter is considered to * match anything. * @param subject if not null, the subject of selected statements * must equal this argument. * @param predicate if not null, the predicate of selected statements * must equal this argument. * @param object if not null, the object of selected statements * must equal this argument. */ public SimpleSelector(Resource subject, Property predicate, Object object) { this.subject = subject; this.predicate = predicate; if (object != null) { this.object = literal( object.toString(), "" ); } else { this.object = null; } }