Tabnine Logo
QualifiedName.getUri
Code IndexAdd Tabnine to your IDE (free)

How to use
getUri
method
in
org.openprovenance.prov.model.QualifiedName

Best Java code snippets using org.openprovenance.prov.model.QualifiedName.getUri (Showing top 20 results out of 315)

origin: org.openprovenance.prov/prov-template

@Override
public int compare(QualifiedName arg0, QualifiedName arg1) {
  return arg0.getUri().compareTo(arg1.getUri());
}
origin: lucmoreau/ProvToolbox

@Override
public int compare(QualifiedName arg0, QualifiedName arg1) {
  return arg0.getUri().compareTo(arg1.getUri());
}
origin: org.openprovenance.prov/prov-dot

public String getPropertyFromAny (Attribute o) {
  return o.getElementName().getUri();
}
origin: lucmoreau/ProvToolbox

public String getPropertyFromAny (Attribute o) {
  return o.getElementName().getUri();
}
origin: lucmoreau/ProvToolbox

public QualifiedName uniquify(QualifiedName q) {
  if (q==null) return null;
  String uri=q.getUri();
  org.openprovenance.prov.model.QualifiedName found=table.get(uri);
  if (found!=null) {
    return found;
  }
  //Query qq=em.createQuery("SELECT e FROM QualifiedName e WHERE e.uri LIKE :uri");
  Query qq=em.createNamedQuery("QualifiedName.Find");
  qq.setParameter("uri", uri);
  @SuppressWarnings("unchecked")
List<QualifiedName> ll=(List<QualifiedName>) qq.getResultList();
  //System.out.println("found ll " + ll);
  
  QualifiedName newId=q;
  if ((ll!=null) && (!(ll.isEmpty()))) {
    newId=ll.get(0);
    //System.out.println("Uniquify found " + newId);
  }
  table.put(uri, newId);
  return newId;
}
origin: org.openprovenance.prov/prov-template

public ExpandAction(ProvFactory pf,
          ProvUtilities u,
          Expand expand,
          Hashtable<QualifiedName, QualifiedName> env,
          Hashtable<QualifiedName, List<TypedValue>> env2,
          List<Integer> index,
          Bindings bindings1,
          Groupings grp1,
          boolean addOrderp,
          boolean allUpdatedRequired) {
  this.pf = pf;
  this.expand = expand;
  this.env = env;
  this.u = u;
  this.index = index;
  this.bindings = bindings1;
  this.grp1 = grp1;
  this.env2 = env2;
  this.addOrderp = addOrderp;
  this.qualifiedNameURI = pf.getName().PROV_QUALIFIED_NAME.getUri();
  this.allUpdatedRequired=allUpdatedRequired;
}
origin: lucmoreau/ProvToolbox

public ExpandAction(ProvFactory pf,
          ProvUtilities u,
          Expand expand,
          Hashtable<QualifiedName, QualifiedName> env,
          Hashtable<QualifiedName, List<TypedValue>> env2,
          List<Integer> index,
          Bindings bindings1,
          Groupings grp1,
          boolean addOrderp,
          boolean allUpdatedRequired) {
  this.pf = pf;
  this.expand = expand;
  this.env = env;
  this.u = u;
  this.index = index;
  this.bindings = bindings1;
  this.grp1 = grp1;
  this.env2 = env2;
  this.addOrderp = addOrderp;
  this.qualifiedNameURI = pf.getName().PROV_QUALIFIED_NAME.getUri();
  this.allUpdatedRequired=allUpdatedRequired;
}
origin: org.openprovenance.prov/prov-template

public static Object convertValueToBean(Object o, QualifiedName type, Hashtable<String, String> context) {
  if (o instanceof Integer) return o;
  if (o instanceof Float) return o;
  if (o instanceof QualifiedName) {
    QualifiedName qn=(QualifiedName)o;
    Hashtable<String,String> table=new Hashtable<String,String>();
    table.put("@id",qn.getPrefix() + ":" + qn.getLocalPart());
    context.put(qn.getPrefix(),qn.getNamespaceURI());
    return table;
  }        
  if (o instanceof LangString) {
    LangString qn=(LangString)o;
    Hashtable<String,String> table=new Hashtable<String,String>();
    table.put("@language",qn.getLang());
    table.put("@value",qn.getValue());
    return table;
  }
  if (o instanceof String)  {
    if ((type==null) || (type.getUri().equals(NamespacePrefixMapper.XSD_NS+"string"))) {
      return o;
    } else {
      Hashtable<String,String> table=new Hashtable<String,String>();
      table.put("@type",type.toString());
      table.put("@value",o.toString());
      return table;
    }
  }
  throw new UnsupportedOperationException("type is " + o);
}

origin: lucmoreau/ProvToolbox

public static Object convertValueToBean(Object o, QualifiedName type, Hashtable<String, String> context) {
  if (o instanceof Integer) return o;
  if (o instanceof Float) return o;
  if (o instanceof QualifiedName) {
    QualifiedName qn=(QualifiedName)o;
    Hashtable<String,String> table=new Hashtable<String,String>();
    table.put("@id",qn.getPrefix() + ":" + qn.getLocalPart());
    context.put(qn.getPrefix(),qn.getNamespaceURI());
    return table;
  }        
  if (o instanceof LangString) {
    LangString qn=(LangString)o;
    Hashtable<String,String> table=new Hashtable<String,String>();
    table.put("@language",qn.getLang());
    table.put("@value",qn.getValue());
    return table;
  }
  if (o instanceof String)  {
    if ((type==null) || (type.getUri().equals(NamespacePrefixMapper.XSD_NS+"string"))) {
      return o;
    } else {
      Hashtable<String,String> table=new Hashtable<String,String>();
      table.put("@type",type.toString());
      table.put("@value",o.toString());
      return table;
    }
  }
  throw new UnsupportedOperationException("type is " + o);
}

origin: org.openprovenance.prov/prov-template

Hashtable<Integer, Hashtable<Integer,TypedValue>> map2=new Hashtable<Integer, Hashtable<Integer,TypedValue>>();
for (Other attr: entity.getOther()) {
  String uri = attr.getElementName().getUri();
  if (uri.startsWith(APP_VALUE)) {
    Integer i=Integer.valueOf(uri.substring(APP_VALUE.length()));
origin: lucmoreau/ProvToolbox

HasOther stmt2=(HasOther)statement;
for (Other other: stmt2.getOther()) {
  if (LINKED_URI.equals(other.getElementName().getUri())) {
    QualifiedName id=((Identifiable)statement).getId();
    QualifiedName otherId=(QualifiedName) other.getValue();
origin: lucmoreau/ProvToolbox

if (type == null)
  type = name.XSD_STRING;
if (FOR_XML_XSD_QNAME.equals(type.getUri())) { 
  QualifiedName qn = stringToQualifiedName(child, el);
  Attribute x= pFactory.newAttribute(namespace, local, prefix, qn, name.PROV_QUALIFIED_NAME);
origin: org.openprovenance.prov/prov-model

if (type == null)
  type = name.XSD_STRING;
if (FOR_XML_XSD_QNAME.equals(type.getUri())) { 
  QualifiedName qn = stringToQualifiedName(child, el);
  Attribute x= pFactory.newAttribute(namespace, local, prefix, qn, name.PROV_QUALIFIED_NAME);
origin: org.openprovenance.prov/prov-template

if (qualifiedNameURI.equals(attribute.getType().getUri())) {
origin: lucmoreau/ProvToolbox

if (qualifiedNameURI.equals(attribute.getType().getUri())) {
origin: org.openprovenance.prov/prov-model

public static String valueToNotationString(Object val, org.openprovenance.prov.model.QualifiedName xsdType) {
  if (val instanceof LangString) {
    LangString istring = (LangString) val;
    return "\"" + istring.getValue() + 
        ((istring.getLang()==null) ? "\"" : "\"@" + istring.getLang())
        + (((xsdType==null)||(xsdType.getUri().equals(internationalizedStringUri)))? "" : " %% " + Namespace.qualifiedNameToStringWithNamespace(xsdType));
  } else if (val instanceof QualifiedName) {
    QualifiedName qn = (QualifiedName) val;        
    return "'" + Namespace.qualifiedNameToStringWithNamespace(qn) + "'";
  } else if (val instanceof String) {
    String s=(String)val;
    if (s.contains("\n")) {
      return "\"\"\"" + escape(s) + "\"\"\"" ;
    } else {
      //FIXME: It's here that we should detect an int and generate the compact form: e.g. 1 instand of 1 %% xsd:int
      // However dictionaries failed to be parsed then
      //if (xsdType.getLocalPart().equals("int")) { //FIXME:need to properly compare with xsd:int
      //    return s;
      //} else {
      return "\"" + escape(s) + ((xsdType==null)? "\"" : "\" %% " + Namespace.qualifiedNameToStringWithNamespace(xsdType));
      //}
    }
  } else {
    // We should never be here!
    return "\"" + val + "\" %% " + Namespace.qualifiedNameToStringWithNamespace(xsdType);
  }
}
origin: lucmoreau/ProvToolbox

public static String valueToNotationString(Object val, org.openprovenance.prov.model.QualifiedName xsdType) {
  if (val instanceof LangString) {
    LangString istring = (LangString) val;
    return "\"" + istring.getValue() + 
        ((istring.getLang()==null) ? "\"" : "\"@" + istring.getLang())
        + (((xsdType==null)||(xsdType.getUri().equals(internationalizedStringUri)))? "" : " %% " + Namespace.qualifiedNameToStringWithNamespace(xsdType));
  } else if (val instanceof QualifiedName) {
    QualifiedName qn = (QualifiedName) val;        
    return "'" + Namespace.qualifiedNameToStringWithNamespace(qn) + "'";
  } else if (val instanceof String) {
    String s=(String)val;
    if (s.contains("\n")) {
      return "\"\"\"" + escape(s) + "\"\"\"" ;
    } else {
      //FIXME: It's here that we should detect an int and generate the compact form: e.g. 1 instand of 1 %% xsd:int
      // However dictionaries failed to be parsed then
      //if (xsdType.getLocalPart().equals("int")) { //FIXME:need to properly compare with xsd:int
      //    return s;
      //} else {
      return "\"" + escape(s) + ((xsdType==null)? "\"" : "\" %% " + Namespace.qualifiedNameToStringWithNamespace(xsdType));
      //}
    }
  } else {
    // We should never be here!
    return "\"" + val + "\" %% " + Namespace.qualifiedNameToStringWithNamespace(xsdType);
  }
}
origin: org.openprovenance.prov/prov-template

String elementName = attribute.getElementName().getUri();
if (ExpandUtil.LABEL_URI.equals(elementName)) {
  Object value=val.getValue();
origin: lucmoreau/ProvToolbox

String elementName = attribute.getElementName().getUri();
if (ExpandUtil.LABEL_URI.equals(elementName)) {
  Object value=val.getValue();
origin: lucmoreau/ProvToolbox

EX2_PREFIX).getUri());
org.openprovenance.prov.modelQualifiedNamegetUri

Popular methods of QualifiedName

  • equals
  • getLocalPart
    Get the local part of this QualifiedName.
  • getNamespaceURI
    Get the Namespace URI of this QualifiedName.
  • getPrefix
    Get the prefix of this Qualified Name.
  • toQName
    Converts this QualifiedName to a valid xsd:QName by unescaping \-characters in the local names, and
  • hashCode
    Generate the hash code for this QualifiedName. The hash code is calculated using both the Namespace

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now