Search in sources :

Example 1 with SlotFrameType

use of org.w3._2007.rif.SlotFrameType in project hale by halestudio.

the class ModelRifToRifTranslator method createAssignmentSlot.

private void createAssignmentSlot(PropertyMapping mapping, Frame frame) {
    SlotFrameType slot = factory.createSlotFrameType();
    // $NON-NLS-1$
    slot.setOrdered("yes");
    Const const1 = factory.createConst();
    const1.getContent().add(mapping.getTarget().getPropertyName());
    // $NON-NLS-1$
    const1.setType("rif:iri");
    slot.getContent().add(const1);
    Var var1 = factory.createVar();
    var1.getContent().add(mapping.getSource().getName());
    slot.getContent().add(var1);
    frame.getSlot().add(slot);
}
Also used : SlotFrameType(org.w3._2007.rif.SlotFrameType) ActionVar(org.w3._2007.rif.Do.ActionVar) Var(org.w3._2007.rif.Var) Const(org.w3._2007.rif.Const)

Example 2 with SlotFrameType

use of org.w3._2007.rif.SlotFrameType in project hale by halestudio.

the class ModelRifToRifTranslator method createBindingSlot.

private void createBindingSlot(RifVariable child, Frame frame) {
    SlotFrameType slot = factory.createSlotFrameType();
    // $NON-NLS-1$
    slot.setOrdered("yes");
    Const const1 = factory.createConst();
    const1.getContent().add(child.getPropertyName());
    // $NON-NLS-1$
    const1.setType("rif:iri");
    slot.getContent().add(const1);
    Var var1 = factory.createVar();
    var1.getContent().add(child.getName());
    slot.getContent().add(var1);
    frame.getSlot().add(slot);
}
Also used : SlotFrameType(org.w3._2007.rif.SlotFrameType) ActionVar(org.w3._2007.rif.Do.ActionVar) Var(org.w3._2007.rif.Var) Const(org.w3._2007.rif.Const)

Example 3 with SlotFrameType

use of org.w3._2007.rif.SlotFrameType in project hale by halestudio.

the class ModelRifToRifTranslator method createStaticAssignmentSlot.

private void createStaticAssignmentSlot(StaticAssignment staticAssignment, Frame frame) {
    SlotFrameType slot = factory.createSlotFrameType();
    // $NON-NLS-1$
    slot.setOrdered("yes");
    Const const1 = factory.createConst();
    const1.getContent().add(staticAssignment.getTarget().getPropertyName());
    // $NON-NLS-1$
    const1.setType("rif:iri");
    slot.getContent().add(const1);
    Const const2 = factory.createConst();
    // $NON-NLS-1$
    const2.setType("http://www.w3.org/2001/XMLSchema#string");
    const2.getContent().add(staticAssignment.getContent());
    slot.getContent().add(const2);
    frame.getSlot().add(slot);
}
Also used : SlotFrameType(org.w3._2007.rif.SlotFrameType) Const(org.w3._2007.rif.Const)

Aggregations

Const (org.w3._2007.rif.Const)3 SlotFrameType (org.w3._2007.rif.SlotFrameType)3 ActionVar (org.w3._2007.rif.Do.ActionVar)2 Var (org.w3._2007.rif.Var)2