@Override public String toString() { return MoreObjects. toStringHelper(getClass()). omitNullValues(). add("predicate", this.predicate). add("label", this.label). add("comment", this.comment). add("cardinality", this.cardinality()). add("allowedLiterals", this.allowedLiterals). add("allowedIndividuals", this.allowedIndividuals). add("datatype", this.datatype). add("literals", this.literals). add("literals", this.individuals). add("nodeKind", this.nodeKind). add("valueShape", this.valueShape). add("valueType", this.valueType). toString(); }
public T withNodeKind(NodeKind nodeKind) { checkNotNull(nodeKind,"Node kind cannot be null"); this.nodeKind=nodeKind; return delegate(); }
public T withValueShape(Shape valueShape) { this.valueShape = valueShape; return delegate(); }
public T withValueType(URI valueType) { this.valueType = valueType; return delegate(); }
public T withAllowedValues(Value... allowedValues) { checkNotNull(allowedValues,"Allowed values cannot be null"); this.allowedLiterals=Sets.newLinkedHashSet(); this.allowedIndividuals=Sets.newLinkedHashSet(); ValueCollector valueCollector=new ValueCollector(this.allowedIndividuals,this.allowedLiterals); for(Value value:allowedValues) { value.accept(valueCollector); } return delegate(); }
public T withComment(String comment) { checkNotNull(comment,"Comment cannot be null"); this.comment=comment; return delegate(); }
public T withLabel(String label) { checkNotNull(label,"Label cannot be null"); this.label=label; return delegate(); }
public T withValue(Value... values) { checkNotNull(values,"Value cannot be null"); this.literals=Lists.newArrayList(); this.individuals=Lists.newArrayList(); ValueCollector valueCollector=new ValueCollector(this.individuals,this.literals); for(Value value:values) { value.accept(valueCollector); } return delegate(); }
public T withDatatype(URI datatype) { checkNotNull(datatype,"Datatype cannot be null"); this.datatype = datatype; return delegate(); }
public T withCardinality(Cardinality cardinality) { checkNotNull(cardinality,"Cardinality cannot be null"); this.cardinality=cardinality; return delegate(); }