org.openprovenance.prov.model.Namespace.addKnownNamespaces()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中org.openprovenance.prov.model.Namespace.addKnownNamespaces()方法的一些代码示例,展示了Namespace.addKnownNamespaces()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Namespace.addKnownNamespaces()方法的具体详情如下:
包路径:org.openprovenance.prov.model.Namespace
类名称:Namespace
方法名:addKnownNamespaces

Namespace.addKnownNamespaces介绍

暂无

代码示例

代码示例来源:origin: lucmoreau/ProvToolbox

public NamespaceGatherer() {
ns.addKnownNamespaces();
ns.setDefaultNamespace(null);
}

代码示例来源:origin: org.openprovenance.prov/prov-model

public NamespaceGatherer() {
ns.addKnownNamespaces();
ns.setDefaultNamespace(null);
}

代码示例来源:origin: lucmoreau/ProvToolbox

private Namespace decodePrefixes(JsonObject bundleStructure) {
Namespace ns = new Namespace();
// prefixes prov and xsd are implicit in prov-json
ns.addKnownNamespaces();
JsonObject prefixes = getObjectAndRemove(bundleStructure,
           PROV_JSON_PREFIX);
if (prefixes != null) {
  for (Map.Entry<String, JsonElement> pair : prefixes.entrySet()) {
  String prefix = pair.getKey();
  String uri = pair.getValue().getAsString();
  if (prefix.equals("default")) {
    ns.registerDefault(uri);
  } else {
    ns.register(prefix, uri);
  }
  }
}
return ns;
}

代码示例来源:origin: org.openprovenance.prov/prov-json

private Namespace decodePrefixes(JsonObject bundleStructure) {
Namespace ns = new Namespace();
// prefixes prov and xsd are implicit in prov-json
ns.addKnownNamespaces();
JsonObject prefixes = getObjectAndRemove(bundleStructure,
           PROV_JSON_PREFIX);
if (prefixes != null) {
  for (Map.Entry<String, JsonElement> pair : prefixes.entrySet()) {
  String prefix = pair.getKey();
  String uri = pair.getValue().getAsString();
  if (prefix.equals("default")) {
    ns.registerDefault(uri);
  } else {
    ns.register(prefix, uri);
  }
  }
}
return ns;
}

代码示例来源:origin: org.openprovenance.prov/prov-n

public TreeTraversal(ModelConstructor c, ProvFactory pFactory) {
  this.c=c;
  this.pFactory=pFactory;
  this.name=pFactory.getName();
  this.namespace=pFactory.newNamespace();
  this.namespace.addKnownNamespaces();
  
  this.vconv=new ValueConverter(pFactory);
}

代码示例来源:origin: lucmoreau/ProvToolbox

public TreeTraversal(ModelConstructor c, ProvFactory pFactory) {
  this.c=c;
  this.pFactory=pFactory;
  this.name=pFactory.getName();
  this.namespace=pFactory.newNamespace();
  this.namespace.addKnownNamespaces();
  
  this.vconv=new ValueConverter(pFactory);
}

代码示例来源:origin: lucmoreau/ProvToolbox

public void addSeed(Document doc, long seed, String name) {
  Namespace namespace = doc.getNamespace();
  QualifiedName qn = namespace.stringToQualifiedName(name, pf);
  for (StatementOrBundle statement : doc.getStatementOrBundle()) {
    if (statement instanceof Identifiable) {
      Identifiable ss = (Identifiable) statement;
      if ((ss.getId() != null) && (ss.getId().equals(qn))) {
        namespace.register(TERM_PREFIX, TERM_NS);
        namespace.addKnownNamespaces();
        ((HasOther) ss).getOther()
            .add(pf.newOther(TERM_NS, "seed", TERM_PREFIX,
                     seed, pf.getName().XSD_LONG));
        return;
      }
    }
  }
}

代码示例来源:origin: org.openprovenance.prov/prov-n

localNamespace.addKnownNamespaces();
  localNamespace.setParent(namespace);

代码示例来源:origin: lucmoreau/ProvToolbox

localNamespace.addKnownNamespaces();
  localNamespace.setParent(namespace);

相关文章