Class Normalizer

java.lang.Object
org.biopax.paxtools.normalizer.Normalizer

public final class Normalizer extends Object
BioPAX (Level 3) Normalizer, an advanced BioPAX utility to help pathway data integrating and linking.
Author:
rodche
  • Field Details

  • Constructor Details

    • Normalizer

      public Normalizer()
      Constructor
  • Method Details

    • normalize

      public String normalize(String biopaxOwlData)
      Deprecated.
      this method will fail if the data exceeds ~1Gb (max UTF8 java String length)
      Normalizes BioPAX OWL data and returns the result as BioPAX OWL (string). This public method is actually intended to use outside the BioPAX Validator framework, with not too large models.
      Parameters:
      biopaxOwlData - RDF/XML BioPAX content string
      Returns:
      normalized BioPAX RDF/XML
    • uri

      public static String uri(String xmlBase, String dbName, String idPart, Class<? extends BioPAXElement> type)
      Consistently generates a new BioPAX element URI using given URI namespace (xml:base), BioPAX class, and two different identifiers (at least one is required). Miriam registry is used to get the standard db name and identifiers.org URI, if possible, only for relationship type vocabulary, publication xref, and entity reference types.
      Parameters:
      xmlBase - xml:base (common URI prefix for a BioPAX model), case-sensitive
      dbName - a bio data collection name or synonym, case-insensitive
      idPart - optional (can be null), e.g., xref.id, case-sensitive
      type - BioPAX class
      Returns:
      URI
      Throws:
      IllegalArgumentException - if either type is null or both 'dbName' and 'idPart' are all nulls.
    • getDescription

      public String getDescription()
      Description of the model to normalize.
      Returns:
      info about the BioPAX model
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description to set
    • normalize

      public void normalize(Model model)
      BioPAX normalization (modifies the original Model)
      Parameters:
      model - BioPAX model to normalize
      Throws:
      NullPointerException - if model is null
      IllegalArgumentException - if model is not Level3 BioPAX
    • autoName

      public static void autoName(Provenance pro)
      Auto-generates standard and other names for the datasource from either its ID (if URN) or one of its existing names (preferably - standard name)
      Parameters:
      pro - data source (BioPAX Provenance)
    • convertToLevel3

      public static String convertToLevel3(String biopaxData)
      Converts BioPAX L1 or L2 RDF/XML string data to BioPAX L3 string. WARN: this is not for huge (larger than 1GB) BioPAX RDF/XML data due to use of (UTF-8) String and Byte Array internally. This can be and is used by online web apps, such as the BioPAX Validator.
      Parameters:
      biopaxData - String
      Returns:
      BioPAX Level3 RDF/XML string
    • isFixDisplayName

      public boolean isFixDisplayName()
    • setFixDisplayName

      public void setFixDisplayName(boolean fixDisplayName)
    • getXmlBase

      public String getXmlBase()
    • setXmlBase

      public void setXmlBase(String xmlBase)