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

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

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

Namespace.stringToQualifiedName介绍

暂无

代码示例

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

private QualifiedName stringToQualifiedName(String attr1) {
return namespace.stringToQualifiedName(attr1,pFactory);
}

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

private QualifiedName stringToQualifiedName(String attr1) {
return namespace.stringToQualifiedName(attr1,pFactory);
}

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

private Collection<QualifiedName> qualifiedNames(String attributeName,
         JsonObject attributeMap) {
List<QualifiedName> results = new ArrayList<QualifiedName>();
List<JsonElement> elements = popMultiValAttribute(attributeName,
             attributeMap);
for (JsonElement element : elements) {
  results.add(currentNamespace.stringToQualifiedName(element.getAsString(),pf));
}
return results;
}

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

private QualifiedName anyRef(String attributeName, JsonObject attributeMap) {
if (attributeMap.has(attributeName))
  return currentNamespace.stringToQualifiedName(popString(attributeMap,
                       attributeName),
                       pf);
else
  return null;
}

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

private QualifiedName qualifiedName(String attributeName, JsonObject attributeMap) {
return currentNamespace.stringToQualifiedName(popString(attributeMap,
                            attributeName),
                       pf);
}

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

private QualifiedName qualifiedName(String attributeName, JsonObject attributeMap) {
return currentNamespace.stringToQualifiedName(popString(attributeMap,
                            attributeName),
                       pf);
}

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

private Collection<QualifiedName> qualifiedNames(String attributeName,
         JsonObject attributeMap) {
List<QualifiedName> results = new ArrayList<QualifiedName>();
List<JsonElement> elements = popMultiValAttribute(attributeName,
             attributeMap);
for (JsonElement element : elements) {
  results.add(currentNamespace.stringToQualifiedName(element.getAsString(),pf));
}
return results;
}

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

private QualifiedName anyRef(String attributeName, JsonObject attributeMap) {
if (attributeMap.has(attributeName))
  return currentNamespace.stringToQualifiedName(popString(attributeMap,
                       attributeName),
                       pf);
else
  return null;
}

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

public Entry decodeDictionaryEntry(QualifiedName datatype,
          String entryKey,
          JsonElement entryValue) {
Key kk;
if (datatype.equals(name.PROV_QUALIFIED_NAME)) {
  kk=(Key) pf.newAttribute(name.PROV_KEY,
               currentNamespace.stringToQualifiedName(entryKey,pf), datatype);
} else {
  kk=(Key) pf.newAttribute(name.PROV_KEY, entryKey, datatype);
}

Entry pair = pf.newEntry(kk,
             currentNamespace.stringToQualifiedName(entryValue.getAsString(), pf));
return pair;
}

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

public Entry decodeDictionaryEntry(QualifiedName datatype,
          String entryKey,
          JsonElement entryValue) {
Key kk;
if (datatype.equals(name.PROV_QUALIFIED_NAME)) {
  kk=(Key) pf.newAttribute(name.PROV_KEY,
               currentNamespace.stringToQualifiedName(entryKey,pf), datatype);
} else {
  kk=(Key) pf.newAttribute(name.PROV_KEY, entryKey, datatype);
}

Entry pair = pf.newEntry(kk,
             currentNamespace.stringToQualifiedName(entryValue.getAsString(), pf));
return pair;
}

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

name.PROV_KEY),
             currentNamespace.stringToQualifiedName(this.popString(item, "$"),pf));
results.add(pair);
QualifiedName datatype = currentNamespace.stringToQualifiedName(keyDatatype,pf);
for (Map.Entry<String, JsonElement> entry : dictionary.entrySet()) {
String entryKey = entry.getKey();

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

name.PROV_KEY),
             currentNamespace.stringToQualifiedName(this.popString(item, "$"),pf));
results.add(pair);
QualifiedName datatype = currentNamespace.stringToQualifiedName(keyDatatype,pf);
for (Map.Entry<String, JsonElement> entry : dictionary.entrySet()) {
String entryKey = entry.getKey();

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

if (tmp==null) {
if (parent!=null) {
  return parent.stringToQualifiedName(id, pFactory);
} else {
  throw new QualifiedNameException("Namespace.stringToQualifiedName(): Null namespace for " + id + " namespace " + this);

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

return new Object[]{ns.stringToQualifiedName(id,pf),pf.getName().PROV_QUALIFIED_NAME};

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

return new Object[]{ns.stringToQualifiedName(id,pf),pf.getName().PROV_QUALIFIED_NAME};

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

if (tmp==null) {
if (parent!=null) {
  return parent.stringToQualifiedName(id, pFactory);
} else {
  throw new QualifiedNameException("Namespace.stringToQualifiedName(): Null namespace for " + id + " namespace " + this);

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

} else if (struct.has("type")) {
String datatypeAsString = struct.get("type").getAsString();
QualifiedName xsdType = currentNamespace.stringToQualifiedName(datatypeAsString, pf);
if (xsdType.equals(name.PROV_QUALIFIED_NAME)) { /* we ignore xsdType.equals(name.FOR_XML_XSD_QNAME)  */
  return pf.newAttribute(elementName,
        currentNamespace.stringToQualifiedName(value,pf), xsdType);
} else {
  return pf.newAttribute(elementName, value, xsdType);

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

} else if (struct.has("type")) {
String datatypeAsString = struct.get("type").getAsString();
QualifiedName xsdType = currentNamespace.stringToQualifiedName(datatypeAsString, pf);
if (xsdType.equals(name.PROV_QUALIFIED_NAME)) { /* we ignore xsdType.equals(name.FOR_XML_XSD_QNAME)  */
  return pf.newAttribute(elementName,
        currentNamespace.stringToQualifiedName(value,pf), xsdType);
} else {
  return pf.newAttribute(elementName, value, xsdType);

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

QualifiedName qualifiedName = namespace.stringToQualifiedName(literal.getDatatype()
                .stringValue(),pFactory);
  dataType = qualifiedName.getNamespaceURI() + qualifiedName.getLocalPart();
  return namespace.stringToQualifiedName(literal.stringValue(), pFactory);
} else if (dataType.equals(NamespacePrefixMapper.XSD_NS + "string")) {
  return literal.stringValue();

代码示例来源: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;
      }
    }
  }
}

相关文章