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

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

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

origin: org.openprovenance.prov/prov-n

public Object convertTypedLiteral(LangString literal, QualifiedName datatype) {
Object value=literal;
if (datatype.equals(name.PROV_QUALIFIED_NAME)) {
  // I could throw an exception since this doesn't make sense, LangString literal cannot go with QUALIFIED_NAME datatype
}
  Object [] valueTypePair=new Object[] {value,datatype};
  return valueTypePair;
}
origin: lucmoreau/ProvToolbox

public AttributeKind getAttributeKind(QualifiedName q) {
  if (q.equals(QualifiedName_PROV_TYPE)) return AttributeKind.PROV_TYPE;
  if (q.equals(QualifiedName_PROV_LABEL)) return AttributeKind.PROV_LABEL;
  if (q.equals(QualifiedName_PROV_VALUE)) return AttributeKind.PROV_VALUE;
  if (q.equals(QualifiedName_PROV_LOCATION)) return AttributeKind.PROV_LOCATION;
  if (q.equals(QualifiedName_PROV_ROLE)) return AttributeKind.PROV_ROLE;
  return AttributeKind.OTHER;
}
origin: lucmoreau/ProvToolbox

public AttributeKind getAttributeKind(QualifiedName q) {
  if (q.equals(QualifiedName_PROV_TYPE)) return AttributeKind.PROV_TYPE;
  if (q.equals(QualifiedName_PROV_LABEL)) return AttributeKind.PROV_LABEL;
  if (q.equals(QualifiedName_PROV_VALUE)) return AttributeKind.PROV_VALUE;
  if (q.equals(QualifiedName_PROV_LOCATION)) return AttributeKind.PROV_LOCATION;
  if (q.equals(QualifiedName_PROV_ROLE)) return AttributeKind.PROV_ROLE;
  return AttributeKind.OTHER;
}
origin: lucmoreau/ProvToolbox

public Object convertTypedLiteral(LangString literal, QualifiedName datatype) {
Object value=literal;
if (datatype.equals(name.PROV_QUALIFIED_NAME)) {
  // I could throw an exception since this doesn't make sense, LangString literal cannot go with QUALIFIED_NAME datatype
}
  Object [] valueTypePair=new Object[] {value,datatype};
  return valueTypePair;
}
origin: org.openprovenance.prov/prov-n

public Object convertTypedLiteral(String literal, QualifiedName datatype) {
Object value=literal;
if (datatype.equals(name.PROV_QUALIFIED_NAME))
  value = stringToQualifiedName(literal);
  Object [] valueTypePair=new Object[] {value,datatype};
  return valueTypePair;
}
origin: lucmoreau/ProvToolbox

public Object convertTypedLiteral(String literal, QualifiedName datatype) {
Object value=literal;
if (datatype.equals(name.PROV_QUALIFIED_NAME))
  value = stringToQualifiedName(literal);
  Object [] valueTypePair=new Object[] {value,datatype};
  return valueTypePair;
}
origin: org.openprovenance.prov/prov-rdf

protected List<Statement> getStatementsForPredicate(QualifiedName context,
            QualifiedName qualifiedName, QualifiedName uri) {
ArrayList<Statement> statements = new ArrayList<Statement>();
for (Statement statement : collators.get(context).get(qualifiedName)) {
  if (convertURIToQualifiedName(statement.getPredicate()).equals(uri)) {
  statements.add(statement);
  }
}
return statements;
}
origin: lucmoreau/ProvToolbox

protected List<Statement> getStatementsForPredicate(QualifiedName context,
            QualifiedName qualifiedName, QualifiedName uri) {
ArrayList<Statement> statements = new ArrayList<Statement>();
for (Statement statement : collators.get(context).get(qualifiedName)) {
  if (convertURIToQualifiedName(statement.getPredicate()).equals(uri)) {
  statements.add(statement);
  }
}
return statements;
}
origin: org.openprovenance.prov/prov-rdf

protected List<Value> getDataObjects(QualifiedName context, 
                   QualifiedName subject,
         QualifiedName pred) {
List<Statement> statements = collators.get(context).get(subject);
List<Value> objects = new ArrayList<Value>();
for (Statement statement : statements) {
  QualifiedName predQ = convertURIToQualifiedName(statement.getPredicate());
  Value value = statement.getObject();
  if (pred.equals(predQ) && (!(value instanceof Resource))) {
  objects.add(value);
  }
}
return objects;
}
origin: org.openprovenance.prov/prov-rdf

protected List<QualifiedName> getObjects(QualifiedName context, QualifiedName subject, QualifiedName pred) {
List<Statement> statements = collators.get(context).get(subject);
List<QualifiedName> objects = new ArrayList<QualifiedName>();
for (Statement statement : statements) {
  QualifiedName predQ = convertURIToQualifiedName(statement.getPredicate());
  Value value = statement.getObject();
  if (pred.equals(predQ) && value instanceof Resource) {
  objects.add(convertResourceToQualifiedName((Resource) value));
  }
}
return objects;
}
origin: lucmoreau/ProvToolbox

protected List<QualifiedName> getObjects(QualifiedName context, QualifiedName subject, QualifiedName pred) {
List<Statement> statements = collators.get(context).get(subject);
List<QualifiedName> objects = new ArrayList<QualifiedName>();
for (Statement statement : statements) {
  QualifiedName predQ = convertURIToQualifiedName(statement.getPredicate());
  Value value = statement.getObject();
  if (pred.equals(predQ) && value instanceof Resource) {
  objects.add(convertResourceToQualifiedName((Resource) value));
  }
}
return objects;
}
origin: lucmoreau/ProvToolbox

/** Converts a byte array in base64 or hexadecimal according to specified type. 
 * 
 * @param bytes array of bytes to convert
 */
public void setValueAsJava(final byte[] bytes) {
if (type.equals(QualifiedName_XSD_BASE64_BINARY)) {
  this.value=ProvFactory.getFactory().base64Encoding(bytes);
} else if (type.equals(QualifiedName_XSD_HEX_BINARY)) {
  this.value=ProvFactory.getFactory().hexEncoding(bytes);
}
}
origin: lucmoreau/ProvToolbox

MentionOf getMentionForRemoteEntity(List<Object> objects,
                  Entity remoteEntity, Bundle remote) {
  for (Object o : objects) {
    if (o instanceof MentionOf) {
      MentionOf ctxt = (MentionOf) o;
      org.openprovenance.prov.model.QualifiedName id1 = remoteEntity.getId();
      org.openprovenance.prov.model.QualifiedName id2 = remote.getId();
      if (ctxt.getGeneralEntity().equals(id1)
          && ctxt.getBundle().equals(id2))
        return ctxt;
    }
  }
  return null;
}
origin: lucmoreau/ProvToolbox

MentionOf getMentionForLocalEntity(List<Statement> records,
                  Entity localEntity, Bundle remote) {
  for (Statement o : records) {
    if (o instanceof MentionOf) {
      MentionOf ctxt = (MentionOf) o;
      org.openprovenance.prov.model.QualifiedName id1 = localEntity.getId();
      org.openprovenance.prov.model.QualifiedName id2 = remote.getId();
      if (ctxt.getSpecificEntity().equals(id1)
          && ctxt.getBundle().equals(id2))
        return ctxt;
    }
  }
  return null;
}
origin: lucmoreau/ProvToolbox

/** Converts a byte array in base64 or hexadecimal according to specified type. 
 * 
 * @param bytes array of bytes to convert
 */
private void setValueFromObject(byte[] bytes) {
  if (type.equals(QualifiedName_XSD_BASE64_BINARY)) {
    setValue(ProvFactory.getFactory().base64Encoding(bytes));
  } else if (type.equals(QualifiedName_XSD_HEX_BINARY)) {
    setValue(ProvFactory.getFactory().hexEncoding(bytes));
  }
}
origin: org.openprovenance.prov/prov-dot

public String displaySize(HasOther p) {
for (Other o: p.getOther()) {
  if (SUM_SIZE.equals(o.getElementName())) {
  return " (" + o.getConvertedValue() + ")";
  }
}
return "";
}
origin: lucmoreau/ProvToolbox

public String displaySize(HasOther p) {
for (Other o: p.getOther()) {
  if (SUM_SIZE.equals(o.getElementName())) {
  return " (" + o.getConvertedValue() + ")";
  }
}
return "";
}
origin: lucmoreau/ProvToolbox

public Key newKey(Object value, QualifiedName type) {
  if (getName().RDF_LITERAL.equals(type)&& (value instanceof String)) {
    value=vconv.convertToJava(type,(String)value);
  }
  Key key = new Key();
  key.type = type;
  key.setValueFromObject(value);
  return key;
}
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: lucmoreau/ProvToolbox

public Key newKey(Object value, QualifiedName type) {
  if (getName().RDF_LITERAL.equals(type)&& (value instanceof String)) {
    value=vconv.convertToJava(type,(String)value);
  }
  Key key = new Key();
  key.type = type;
  key.setValueFromObject(value);
  return key;
}
org.openprovenance.prov.modelQualifiedNameequals

Popular methods of QualifiedName

  • getLocalPart
    Get the local part of this QualifiedName.
  • getNamespaceURI
    Get the Namespace URI of this QualifiedName.
  • getPrefix
    Get the prefix of this Qualified Name.
  • getUri
  • 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
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JPanel (javax.swing)
  • Top PhpStorm plugins
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