Tabnine Logo
OWLLiteralImplString
Code IndexAdd Tabnine to your IDE (free)

How to use
OWLLiteralImplString
in
uk.ac.manchester.cs.owl.owlapi

Best Java code snippets using uk.ac.manchester.cs.owl.owlapi.OWLLiteralImplString (Showing top 20 results out of 315)

origin: net.sourceforge.owlapi/owlapi-impl

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public OWLLiteral getOWLLiteral(@Nonnull String value) {
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

private final int getHashCode(String lit) {
  int code = 277;
  code = code * 37 + getDatatype().hashCode();
  code = code * 37 + lit.hashCode() * 65536;
  if (hasLang()) {
    code = code * 37 + getLang().hashCode();
  }
  return code;
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public boolean equals(Object obj) {
  if (obj == null) {
    return false;
  }
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof OWLLiteral)) {
    return false;
  }
  OWLLiteral other = (OWLLiteral) obj;
  return getLiteral().equals(other.getLiteral()) && getDatatype().equals(other.getDatatype())
    && getLang().equals(other.getLang());
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public int parseInteger() throws NumberFormatException {
  return Integer.parseInt(getLiteral());
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

@Override
public int compareTo(OWLObject o) {
  int thisTypeIndex = index();
  int otherTypeIndex = 0;
  if (o instanceof OWLObjectImplWithEntityAndAnonCaching) {
    otherTypeIndex = ((OWLObjectImplWithEntityAndAnonCaching) o).index();
  } else {
    otherTypeIndex =
      OWLObjectImplWithEntityAndAnonCaching.OWLOBJECT_TYPEINDEX_PROVIDER.getTypeIndex(o);
  }
  int diff = thisTypeIndex - otherTypeIndex;
  if (diff == 0) {
    // Objects are the same type
    return compareObjectOfSameType(o);
  } else {
    return diff;
  }
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

protected int compareObjectOfSameType(OWLObject object) {
  OWLLiteral other = (OWLLiteral) object;
  int diff = getLiteral().compareTo(other.getLiteral());
  if (diff != 0) {
    return diff;
  }
  diff = getDatatype().compareTo(other.getDatatype());
  if (diff != 0) {
    return diff;
  }
  return getLang().compareTo(other.getLang());
}
origin: net.sourceforge.owlapi/owlapi-gwt-serialization

public static void serialize(SerializationStreamWriter streamWriter, OWLLiteralImplString instance) throws SerializationException {
  streamWriter.writeString(instance.getLiteral());
}
origin: owlcs/owlapi

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: owlcs/owlapi

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: ontodev/robot

try {
 OWLLiteralImplString str = (OWLLiteralImplString) av;
 annotationValue = str.getLiteral();
} catch (ClassCastException ex2) {
 continue;
origin: net.sourceforge.owlapi/owlapi-distribution

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: net.sourceforge.owlapi/owlapi-impl

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

@Override
public int initHashCode() {
  int hash = hashIndex();
  hash = OWLObject.hashIteration(hash, getDatatype().hashCode());
  hash = OWLObject.hashIteration(hash, getLiteral().hashCode() * 65536);
  return OWLObject.hashIteration(hash, getLang().hashCode());
}
origin: net.sourceforge.owlapi/owlapi-distribution

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

@Override
public OWLLiteral getOWLLiteral(String value) {
  if (useCompression) {
    return new OWLLiteralImpl(value, "", XSDSTRING);
  }
  return new OWLLiteralImplString(value);
}
origin: net.sourceforge.owlapi/owlapi-gwt-serialization

public static OWLLiteralImplString instantiate(SerializationStreamReader streamReader) throws SerializationException {
  return new OWLLiteralImplString(streamReader.readString());
}
origin: owlcs/owlapi

@Override
public OWLLiteral getOWLLiteral(String literal, @Nullable String lang) {
  String normalisedLang;
  if (lang == null) {
    normalisedLang = "";
  } else {
    normalisedLang = lang.trim().toLowerCase(Locale.ENGLISH);
  }
  if (normalisedLang.isEmpty()) {
    if (useCompression) {
      return new OWLLiteralImpl(literal, null, XSDSTRING);
    }
    return new OWLLiteralImplString(literal);
  } else {
    if (useCompression) {
      return new OWLLiteralImpl(literal, normalisedLang, null);
    }
    return new OWLLiteralImplPlain(literal, normalisedLang);
  }
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

@Override
public OWLLiteral getOWLLiteral(String literal, @Nullable String lang) {
  String normalisedLang;
  if (lang == null) {
    normalisedLang = "";
  } else {
    normalisedLang = lang.trim().toLowerCase(Locale.ENGLISH);
  }
  if (normalisedLang.isEmpty()) {
    if (useCompression) {
      return new OWLLiteralImpl(literal, null, XSDSTRING);
    }
    return new OWLLiteralImplString(literal);
  } else {
    if (useCompression) {
      return new OWLLiteralImpl(literal, normalisedLang, null);
    }
    return new OWLLiteralImplPlain(literal, normalisedLang);
  }
}
origin: net.sourceforge.owlapi/owlapi-distribution

@Override
public OWLLiteral getOWLLiteral(String literal, @Nullable String lang) {
  String normalisedLang;
  if (lang == null) {
    normalisedLang = "";
  } else {
    normalisedLang = lang.trim().toLowerCase(Locale.ENGLISH);
  }
  if (normalisedLang.isEmpty()) {
    if (useCompression) {
      return new OWLLiteralImpl(literal, null, XSDSTRING);
    }
    return new OWLLiteralImplString(literal);
  } else {
    if (useCompression) {
      return new OWLLiteralImpl(literal, normalisedLang, null);
    }
    return new OWLLiteralImplPlain(literal, normalisedLang);
  }
}
uk.ac.manchester.cs.owl.owlapiOWLLiteralImplString

Javadoc

An OWLLiteral with xsd:string datatype and no language tag.

Most used methods

  • getLiteral
  • <init>
  • getDatatype
  • getLang
  • hashIndex
  • compareObjectOfSameType
  • getHashCode
  • hasLang
  • index

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Join (org.hibernate.mapping)
  • Best IntelliJ 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