Package org.mantikhor.llapi

Examples of org.mantikhor.llapi.DomainURI


   */
  public void testGetTypedefURI()
  {
    for (PropertyDefinition propertyDefinition : propertyDefinitionImpls)
    {
      DomainURI domainURI = propertyDefinition.getTypedefURI();
      DomainURI fromMap = map.get(propertyDefinition.getCategory());
      assertTrue(domainURI.equals(fromMap));
    }
  }
View Full Code Here


    // More tests not described above ...
    try
    {
      // This is a new DomainURI that we haven't used yet ...
      DomainURI domainURI = DomainURI.valueByString(uris[5]);

      // Make up a PropertyDefinition that matches propertyDefinitionImpls.get(0) in
      // PropertyCategory but not DomainURI.
      PropertyDefinition newPropDef =
        new PropertyDefinitionImpl(propertyDefinitionImpls.get(0).getCategory(), domainURI);
     
      // Calculate the result from a compareTo of this new PropertyDefinition (anotherOne) and the
      // pre-constructed one that has the same PropertyCategory.
      int result =
        newPropDef.compareTo(propertyDefinitionImpls.get(0));
     
      // The above result should be equal to the compareTo for the DomainURI
      assertTrue
      ( result ==
         (domainURI.compareTo(propertyDefinitionImpls.get(0).getTypedefURI()))
      );
     
    }
    catch (IllegalArgumentException e)
    {
View Full Code Here

  public void testEquals() 
  {
    PropertyDefinition propDef0 = propertyDefinitionImpls.get(0);
   
    // Different instance, but should be equal to propDef0 ...
    DomainURI uri = (DomainURI)map.get(PropertyCategory.TYPEDEF);
    PropertyDefinition sameAsPropDef0 =
      new PropertyDefinitionImpl(PropertyCategory.TYPEDEF, DomainURI.valueByString(uri.toString()));

    // Assert that propDef0 and sameAsPropDef0 are equal ... they are of the same category and same domain URI.
    assertTrue(propDef0.equals(sameAsPropDef0));

    // Test for symmetry
View Full Code Here

 
  try
  {
      URI uri = new URI("http://wijis.wisconsin.gov/names/operators/wijis/tech/YogeshChawla/");
      assertTrue(baseTypeAnyURI.isTypeOK(uri));
      assertTrue(baseTypeAnyURI.isTypeOK(new DomainURI(uri)));
      URL url = new URL("http://wijis.wisconsin.gov/names/operators/wijis/tech/YogeshChawla/");
      assertTrue(baseTypeAnyURI.isTypeOK(url));
  } catch (IllegalArgumentException e)
  {
      e.printStackTrace();
View Full Code Here

        StringBuilder rep = new StringBuilder(2000);
        rep.append(MantikhorUtil.formatString(this, StringRepType.CLASS_NAME, new String[0]));
        rep.append(MantikhorUtil.getMarker(StringRepType.BEGIN));
      PropertyCategory cat = this.getCategory();
      rep.append(MantikhorUtil.formatString(cat, StringRepType.ENUM, new String[0])).append(MantikhorUtil.getMarker(StringRepType.SEP));
      DomainURI uri = this.getTypedefURI();
        rep.append(MantikhorUtil.formatString(uri, StringRepType.DELEGATE_TO_STRING, new String[] {"DomainURI-null"}));
        rep.append(MantikhorUtil.getMarker(StringRepType.END));
        return rep.toString();
    }
View Full Code Here

TOP

Related Classes of org.mantikhor.llapi.DomainURI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.