Package org.topbraid.spin.model.update

Examples of org.topbraid.spin.model.update.Update


  if (ontClass.getPropertyResourceValue(ResourceFactory.createProperty(SPIN.NS, "update")) == null)
      throw new IllegalArgumentException("Resource OntClass must have a SPIN update or template call resource (spin:update)");

  Resource updateOrTemplateCall = ontClass.getPropertyResourceValue(ResourceFactory.createProperty(SPIN.NS, "update"));
 
        Update update = SPINFactory.asUpdate(updateOrTemplateCall);
        if (update != null) return getUpdateRequest(update.toString(), resource);

        TemplateCall templateCall = SPINFactory.asTemplateCall(updateOrTemplateCall);
        if (templateCall != null) return getUpdateRequest(templateCall.getQueryString(), resource);
       
        return null;
View Full Code Here


    public static InsertDataBuilder fromResource(Resource resource)
    {
  if (resource == null) throw new IllegalArgumentException("InsertData Resource cannot be null");
 
  Update update = SPINFactory.asUpdate(resource);
  if (update == null || !(update instanceof InsertData))
      throw new IllegalArgumentException("InsertDataBuilder Resource must be a SPIN INSERT DATA Query");

  return fromInsertData((InsertData)update);
    }
View Full Code Here

    public static ModifyBuilder fromResource(Resource resource)
    {
  if (resource == null) throw new IllegalArgumentException("Modify Resource cannot be null");
 
  Update update = SPINFactory.asUpdate(resource);
  if (update == null || !(update instanceof Modify))
      throw new IllegalArgumentException("ModifyBuilder Resource must be a SPIN INSERT/DELETE Query");

  return fromModify((Modify)update);
    }
View Full Code Here

TOP

Related Classes of org.topbraid.spin.model.update.Update

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.