/**
  * Add resource
  *
  * @param resource resource to add
  * @return jastor object for resource
  * @throws org.openanzo.rdf.jastor.JastorException
  */
 public org.openanzo.ontologies.execution.SemanticOperation addOperation(
     org.openanzo.rdf.Resource resource) throws org.openanzo.rdf.jastor.JastorException {
   org.openanzo.ontologies.execution.SemanticOperation operation =
       org.openanzo.ontologies.execution.SemanticServiceFactory.getSemanticOperation(
           resource, _graph.getNamedGraphUri(), _dataset);
   _dataset.add(_resource, operationProperty, operation.resource(), _graph.getNamedGraphUri());
   return operation;
 }
 public org.openanzo.ontologies.execution.SemanticOperation getPropertyValue(
     org.openanzo.rdf.Value resource) {
   try {
     return org.openanzo.ontologies.execution.SemanticServiceFactory
         .getSemanticOperation(
             (org.openanzo.rdf.Resource) resource, _graph.getNamedGraphUri(), dataset());
   } catch (org.openanzo.rdf.jastor.JastorException e) {
     throw new java.util.NoSuchElementException(e.getMessage());
   }
 }
 public void statementsRemoved(
     org.openanzo.rdf.IDataset dataset, org.openanzo.rdf.Statement... statements) {
   for (org.openanzo.rdf.Statement statement : statements) {
     if (statement.getSubject().equals(resource())) {
       if (statement.getPredicate().equals(serviceUserProperty)) {
         if (!(statement.getObject() instanceof org.openanzo.rdf.Literal)) return;
         for (JavascriptSemanticServiceListener listener : listeners) {
           listener.serviceUserChanged(
               org.openanzo.ontologies.execution.JavascriptSemanticServiceImpl.this);
         }
         return;
       }
       if (statement.getPredicate().equals(operationProperty)) {
         if (!(statement.getObject() instanceof org.openanzo.rdf.Resource)) return;
         org.openanzo.rdf.Resource resource = (org.openanzo.rdf.Resource) statement.getObject();
         org.openanzo.ontologies.execution.SemanticOperation _operation =
             org.openanzo.ontologies.execution.SemanticServiceFactory.getSemanticOperation(
                 resource, _graph.getNamedGraphUri(), dataset());
         if (_operation != null) {
           for (JavascriptSemanticServiceListener listener : listeners) {
             listener.operationRemoved(
                 org.openanzo.ontologies.execution.JavascriptSemanticServiceImpl.this,
                 _operation);
           }
         }
         return;
       }
       if (statement.getPredicate().equals(stateStyleProperty)) {
         if (!(statement.getObject() instanceof org.openanzo.rdf.Resource)) return;
         for (JavascriptSemanticServiceListener listener : listeners) {
           listener.stateStyleChanged(
               org.openanzo.ontologies.execution.JavascriptSemanticServiceImpl.this);
         }
         return;
       }
       if (statement.getPredicate().equals(scriptResourceProperty)) {
         if (!(statement.getObject() instanceof org.openanzo.rdf.Literal)) return;
         for (JavascriptSemanticServiceListener listener : listeners) {
           listener.scriptResourceChanged(
               org.openanzo.ontologies.execution.JavascriptSemanticServiceImpl.this);
         }
         return;
       }
       if (statement.getPredicate().equals(scriptLocationProperty)) {
         if (!(statement.getObject() instanceof org.openanzo.rdf.Resource)) return;
         for (JavascriptSemanticServiceListener listener : listeners) {
           listener.scriptLocationChanged(
               org.openanzo.ontologies.execution.JavascriptSemanticServiceImpl.this);
         }
         return;
       }
     }
   }
 }