1 19 20 package com.hp.hpl.jena.ontology.impl; 23 24 25 26 import com.hp.hpl.jena.enhanced.*; 29 import com.hp.hpl.jena.graph.*; 30 import com.hp.hpl.jena.ontology.*; 31 32 33 34 43 public class InverseFunctionalPropertyImpl 44 extends ObjectPropertyImpl 45 implements InverseFunctionalProperty 46 { 47 50 53 58 public static Implementation factory = new Implementation() { 59 public EnhNode wrap( Node n, EnhGraph eg ) { 60 if (canWrap( n, eg )) { 61 return new InverseFunctionalPropertyImpl( n, eg ); 62 } 63 else { 64 throw new ConversionException( "Cannot convert node " + n + " to InverseFunctionalProperty - it must have rdf:type owl:InverseFunctionalProperty or equivalent" ); 65 } 66 } 67 68 public boolean canWrap( Node node, EnhGraph eg ) { 69 Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; 71 return (profile != null) && profile.isSupported( node, eg, InverseFunctionalProperty.class ); 72 } 73 }; 74 75 76 79 82 90 public InverseFunctionalPropertyImpl( Node n, EnhGraph g ) { 91 super( n, g ); 92 } 93 94 95 98 101 105 } 106 107 108 137 138 | Popular Tags |