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 SymmetricPropertyImpl 44 extends ObjectPropertyImpl 45 implements SymmetricProperty 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 SymmetricPropertyImpl( n, eg ); 62 } 63 else { 64 throw new ConversionException( "Cannot convert node " + n + " to SymmetricProperty"); 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, SymmetricProperty.class ); 72 } 73 }; 74 75 76 79 82 90 public SymmetricPropertyImpl( Node n, EnhGraph g ) { 91 super( n, g ); 92 } 93 94 95 98 101 105 } 106 107 108 137 138 | Popular Tags |