예제 #1
0
파일: Helper.java 프로젝트: GeoKnow/rsine
  public static void setLabel(
      RepositoryConnection repCon,
      org.openrdf.model.URI concept,
      org.openrdf.model.URI labelType,
      Literal newlabel,
      PersistAndNotifyProvider persistAndNotifyProvider)
      throws RepositoryException {
    repCon.add(concept, labelType, newlabel);

    persistAndNotifyProvider.persistAndNotify(
        Helper.createChangeSetModel(
            concept.stringValue(),
            labelType.stringValue(),
            newlabel,
            ChangeTripleService.CHANGETYPE_ADD),
        true);
  }
예제 #2
0
파일: Helper.java 프로젝트: GeoKnow/rsine
  public static void addToDatasetAndPersist(
      Statement statement,
      DatasetGraph datasetGraph,
      PersistAndNotifyProvider persistAndNotifyProvider) {
    datasetGraph
        .getDefaultGraph()
        .add(
            new Triple(
                NodeFactory.createURI(statement.getSubject().toString()),
                NodeFactory.createURI(statement.getPredicate().toString()),
                NodeFactory.createURI(statement.getObject().toString())));

    persistAndNotifyProvider.persistAndNotify(
        Helper.createChangeSetModel(
            statement.getSubject().stringValue(),
            statement.getPredicate().stringValue(),
            statement.getObject(),
            ChangeTripleService.CHANGETYPE_ADD),
        true);
  }