package net.fortytwo.twitlogic.syntax.afterthought.impl;

import net.fortytwo.twitlogic.syntax.afterthought.ObjectPropertyAfterthoughtMatcher;
import net.fortytwo.twitlogic.vocabs.OWL;

/**
 * User: josh
 * Date: Oct 26, 2009
 * Time: 6:39:56 PM
 */
public class OwlSameasMatcher  extends ObjectPropertyAfterthoughtMatcher {
    protected String getPropertyURI() {
        return OWL.SAMEAS;
    }

    protected boolean predicateMatches(final String predicate) {
        String p = predicate.toLowerCase();
        return p.equals("same as")
                | p.equals("=")
                | p.equals("aka")
                | p.equals("a.k.a.")
                | p.equals("ie")
                | p.equals("i.e.");
    }
}

@@ -536,16 +536,53 @@
 me as%22)%0A
+                %7C p.equals(%22sameas%22)%0A
         

Support '#foo (sameas #bar)' in addition to '#foo (same as #bar)', '#foo (= #bar)', etc.